package com.nineclock.approve.resolver.impl;

import cn.hutool.json.JSONObject;
import com.nineclock.approve.resolver.ProcessNodeResolver;
import org.activiti.bpmn.model.EndEvent;
import org.activiti.bpmn.model.Process;

/**
 * 结束节点 ----> type: end
 */
public class EndNodeResolver extends ProcessNodeResolver {

    @Override
    public void addFlowNodeToActiviti(Process process, JSONObject currNode, JSONObject nextNode) {

        //创建节点
        EndEvent endEvent = new EndEvent();
        endEvent.setId(getNodeId(currNode));
        endEvent.setName(currNode.getStr("name"));

        process.addFlowElement(endEvent);

        //无需绘制连线
    }
    
}
